const MyFavorite = require("../../model/myFavorite")
const Goods = require("../../model/goods")
module.exports = async(req, res) => {
    const { uid } = req.body;
    let resData = {
        data: req.body,
        meta: {
            code: 200,
            msg: "获取成功",
        },
    };
    let myFavorite = await MyFavorite.find({ uid }).populate('sid').populate('uid'); // populate可以多重链式调用
    resData.data = myFavorite;
    res.send(resData);
}